This repository was archived by the owner on Mar 18, 2024. It is now read-only.
[2023-10-13] wooyeol #335#336
Merged
Merged
Conversation
Closed
zsmalla
approved these changes
Oct 14, 2023
Contributor
zsmalla
left a comment
There was a problem hiding this comment.
- 플레이어 이동
- 정 사각형 좌표 구하기
- 회전하기
이렇게 모듈화하는 부분이 같은데 다르게 구현해서 재미있었네요! 구현이 생각보다 너무 빡세고 고려할 게 많아서 메서드를 구현하기 전에 설계하는게 정말 중요했던 문제인 것 같습니다.
설마 이것보다 어렵게 나오겠어요 코테 가서 뿌시고 오시죠 화이팅!
Contributor
There was a problem hiding this comment.
if (nx, xy) == exit_coordinate 로 조건을 주면 더 간결하게 조건식을 작성할 수 있을 것 같습니다.
Contributor
There was a problem hiding this comment.
해당 함수와 players의 결합도를 줄이기 위해서 move 함수를 플레이어 1명 단위로 설계하고, 반복문을 함수 바깥에서 수행한다면 이렇게 별도의 리스트에 임시 이동 리스트를 두지 않아도 간결하게 함수 구성이 가능할 것 같다는 생각이 들었습니다. 개인적인 경험으로 복잡해지는 경우가 많더라고요!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
메이즈 러너
https://www.codetree.ai/training-field/frequent-problems/problems/maze-runner/description?page=1&pageSize=20
풀이시간
10:20 ~ 11 :54
13:12 ~ 14: 04
14:14 ~ 18:09 (6시간 19분)
문제 조건
N: 미로의 크기 (4≤N≤10)
M: 참가자 수 (1≤M≤10)
K: 게임 시간 (1≤K≤100)
시간 복잡도 :
O(K * (M^2 + M + MlogM + N^2 + M + N^2))
O(100 * (100 + 10 + 10log10 + 100 + 10 + 100))
접근법
무슨 알고리즘으로 풀이 할 수 있을까? -> 시뮬레이션
1초 동안 진행하기 위해 필요한 연산들
현재 턴에 모든 플레이어 이동
가장 작은 정사각형 확인하기
가장 작은 정사각형 회전하기